package SpringAop;

import SpringAop.Tank;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;


public class SpringAop {
    public static void main(String[] args){
        ApplicationContext context = new ClassPathXmlApplicationContext("app.xml");
        // 从spring 的bean工厂拿出类的实例化
        Tank t = (Tank) context.getBean("tanks");
        t.saying();
    }
}
